#!/usr/bin/python3

def print_grade(score):
    if score < 50:
        print('The grade for', score, 'is D')
    elif score < 65:
        print('The grade for', score, 'is C')
    elif score < 80:
        print('The grade for', score, 'is B')
    else:
        print('The grade for', score, 'is A')

score = int(input('Please enter a score\n'))
while score != -1:
    print_grade(score)
    score = int(input('\nPlease enter a score\n'))
print('Goodbye')